package cn.fanqinghong.ymcc.service.impl;

import cn.fanqinghong.ymcc.domain.MessageSms;
import cn.fanqinghong.ymcc.mapper.MessageSmsMapper;
import cn.fanqinghong.ymcc.service.IMessageSmsService;
import cn.fanqinghong.ymcc.vo.SmsVo;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author superman.fan
 * @since 2022-07-15
 */
@Service
public class MessageSmsServiceImpl extends ServiceImpl<MessageSmsMapper, MessageSms> implements IMessageSmsService {


    /**
     * 通过电话查询信息
     * @param mobile
     * @return
     */
    @Override
    public List<MessageSms> selectByMobile(String mobile) {
        Wrapper<MessageSms> tWrapper = new EntityWrapper<>();
        tWrapper.eq("mobile",mobile);
        return selectList(tWrapper);
    }

    /**
     * 批量设置userid
     * @param messageSms
     */
    @Override
    public Boolean batchUpdate(List<MessageSms> messageSms) {
        return updateBatchById(messageSms);
    }


}
